package org.bamboo.easyejb;

import java.util.Hashtable;

import javax.ejb.*;

/**
 * RemoteLocalEJBInvoker
 * @author Ramond KK He, raymond.kk.he@gmail.com 
 * @version 1.0 
 * 2008-11-27
 */
public interface RemoteLocalEJBInvoker  extends EJBObject {
	
	/**
	 * invoke ejb
	 * @param jndi
	 * @param methodName	
	 * @param args
	 * @return
	 * @throws java.rmi.RemoteException
	 * @throws Exception
	 */
	public Object invokeEJB(String jndi,String methodName,Object[] args) throws java.rmi.RemoteException,Exception;
	
	/**
	 * Invoke java object(pojo) on remote ejb server
	 * @param jndi
	 * @param homeClass
	 * @param methodName
	 * @param paramDef
	 * @param args
	 * @return
	 * @throws java.rmi.RemoteException
	 * @throws Exception
	 */
	public Object invokePojo(String clazz, String methodName,Object[] args) throws java.rmi.RemoteException,Exception;
	
	/**
	 * set initial context of ejb container
	 * @param ejbInitalContextProperties
	 * @throws java.rmi.RemoteException
	 */
	public void setInitialContextProperties(Hashtable localEJBContextProperties) throws java.rmi.RemoteException;
}
